Non-generic ArrayDeque can store Any type of object like Integer, String, Date…etc
Generic ArrayDeque can store only specify the ClassName.
ArrayDeque Methods
void add(value)
inserts the specified element at the end of the array deque.
void addFirst(value)
inserts the specified element at the beginning of the array deque.
void addLast(value)
inserts the specified at the end of the array deque .
Notes:If the array deque is full, all these methods add(), addFirst() and addLast() throws IllegalStateException.
Boolean offer(value)
inserts the specified element at the end of the array deque.
Boolean offerFirst(value)
inserts the specified element at the beginning of the array deque.
Boolean offerLast(value)
inserts the specified at the end of the array deque .
Notes:offer(), offerFirst() and offerLast() returns true if the element is successfully inserted, if the array deque is full, these methods return false.
object getFirst ()
returns the first element of the array deque.
object getLast()
returns the last element of the array deque.
object peek()
returns the first element of the array deque.
object peekFirst()
returns the first element of the array deque.
object peekLast()
returns the last element of the array deque
object remove()
returns and removes an element from the first element of the array deque.
object remove(element)
returns and removes the specified element from the head of the array deque.
object removeFirst()
returns and removes the first element from the array deque.
object removeLast()
returns and removes the last element from the array deque.